﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataLib.Accounts.Bus;
using System.Data;

namespace Ewts.PD
{
    public partial class PDOutsUpdate : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserInfo"] != null)
            {
                User curUser = new DataLib.Accounts.Bus.User();
                curUser = (User)Session["UserInfo"];
                string city = "";

                if (curUser.UserType != "AD")
                    city = curUser.CompanyCity;
                bindData(city);
                bindData(city);
            }
            else
            {
                Response.Redirect("/accounts/login.aspx");
            }
        }

        public void bindData(string city)
        {
            DataTable dt = new DataTable();
            dt = new DataLib.BLL.OutStorage().GetPDOutsList(city, "0");
            rept.DataSource = dt;
            rept.DataBind();
        } 
    }
}